package com.lcf.system.controller;


import com.lcf.system.service.MoviePrizeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 点赞(MoviePrize)表控制层
 *
 * @author lcf
 * @since 2025-05-07 22:23:23
 */
@Tag(name = "点赞")
@RestController
@RequestMapping("moviePrize")
public class MoviePrizeController {
    @Resource
    private MoviePrizeService moviePrizeService;

    /**
     * 点赞
     */
    @Operation(summary = "点赞")
    @PostMapping("{movieId}")
    void add(@PathVariable @Schema(description = "电影ID") long movieId) {
        moviePrizeService.add(movieId);
    }

    /**
     * 取消点赞
     */
    @Operation(summary = "取消点赞")
    @PostMapping("cancel/{movieId}")
    void cancel(@PathVariable @Schema(description = "电影ID") long movieId) {
        moviePrizeService.cancel(movieId);
    }
}

